package com.galaxis.wms.query

import com.galaxis.wms.entity.BasUser
import com.querydsl.core.types.Path
import com.querydsl.core.types.PathMetadata
import com.querydsl.core.types.dsl.DateTimePath
import com.querydsl.core.types.dsl.NumberPath
import com.querydsl.core.types.dsl.StringPath
import com.querydsl.sql.ColumnMetadata
import com.querydsl.sql.RelationalPathBase

import java.sql.Timestamp
import java.sql.Types

import static com.querydsl.core.types.PathMetadataFactory.forVariable

/**
 * 用户(bas_user)
 */
@SuppressWarnings("ALL")
class QBasUser extends RelationalPathBase<BasUser> {
    /** bas_user表 */
    public static final QBasUser basUser = new QBasUser("bas_user")

    /** 用户ID */
    public final NumberPath<Long> userId = createNumber("userId", Long.class)
    /** 用户编码 */
    public final StringPath userCode = createString("userCode")
    /** 用户名称 */
    public final StringPath userName = createString("userName")
    /** 是否启用 */
    public final NumberPath<Integer> isEnable = createNumber("isEnable", Integer.class)
    /** 创建者 */
    public final StringPath createBy = createString("createBy")
    /** 建立时间 */
    public final DateTimePath<Timestamp> createAt = createDateTime("createAt", Timestamp.class)
    /** 修改者 */
    public final StringPath updateBy = createString("updateBy")
    /** 更新时间 */
    public final DateTimePath<Timestamp> updateAt = createDateTime("updateAt", Timestamp.class)

    QBasUser(String variable) {
        super(BasUser.class, forVariable(variable), "public", "bas_user")
        addMetadata()
    }

    QBasUser(String variable, String schema, String table) {
        super(BasUser.class, forVariable(variable), schema, table)
        addMetadata()
    }

    QBasUser(String variable, String schema) {
        super(BasUser.class, forVariable(variable), schema, "bas_user")
        addMetadata()
    }

    QBasUser(Path<? extends BasUser> path) {
        super(path.getType(), path.getMetadata(), "public", "bas_user")
        addMetadata()
    }

    QBasUser(PathMetadata metadata) {
        super(BasUser.class, metadata, "public", "bas_user")
        addMetadata()
    }

    void addMetadata() {
        addMetadata(userId, ColumnMetadata.named("user_id").withIndex(1).ofType(Types.BIGINT).withSize(64))
        addMetadata(userCode, ColumnMetadata.named("user_code").withIndex(2).ofType(Types.VARCHAR).withSize(255))
        addMetadata(userName, ColumnMetadata.named("user_name").withIndex(3).ofType(Types.VARCHAR).withSize(255))
        addMetadata(isEnable, ColumnMetadata.named("is_enable").withIndex(4).ofType(Types.INTEGER))
        addMetadata(createBy, ColumnMetadata.named("create_by").withIndex(5).ofType(Types.VARCHAR).withSize(64))
        addMetadata(createAt, ColumnMetadata.named("create_at").withIndex(6).ofType(Types.TIMESTAMP).withSize(100))
        addMetadata(updateBy, ColumnMetadata.named("update_by").withIndex(7).ofType(Types.VARCHAR).withSize(64))
        addMetadata(updateAt, ColumnMetadata.named("update_at").withIndex(8).ofType(Types.TIMESTAMP).withSize(100))
    }
}